<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>预定义常量</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="zip.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="zip.examples.html">范例</a></div>
 <div class="up"><a href="book.zip.html">Zip</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="zip.constants" class="appendix">
 <h1>预定义常量</h1>

 <p class="simpara">下列常量由此扩展定义，且仅在此扩展编译入 PHP 或在运行时动态载入时可用。</p>
 
 <p class="para">
  <a href="class.ziparchive.html" class="classname">ZipArchive</a> 使用的类常量。 
  有以下三类常量：Flags（以 <em>FL_</em> 为前缀），errors（以
  <em>ER_</em> 为前缀）以及 mode（没有前缀）。
 </p>
 
 <dl>

  
   <dt id="ziparchive.constants.create">
    <strong><code>ZIPARCHIVE::CREATE</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     如果不存在则创建一个zip压缩包。
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.overwrite">
    <strong><code>ZIPARCHIVE::OVERWRITE</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     总是以一个新的压缩包开始，此模式下如果已经存在则会被覆盖。
    </span>
   </dd>

  
  
  
   <dt id="ziparchive.constants.excl">
    <strong><code>ZIPARCHIVE::EXCL</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     如果压缩包已经存在，则出错。
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.checkcons">
    <strong><code>ZIPARCHIVE::CHECKCONS</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     对压缩包执行额外的一致性检查，如果失败则显示错误。
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.fl-nocase">
    <strong><code>ZIPARCHIVE::FL_NOCASE</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     查找时忽略名称的大小写。
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.fl-nodir">
    <strong><code>ZIPARCHIVE::FL_NODIR</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     忽略目录部分
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.fl-compressed">
    <strong><code>ZIPARCHIVE::FL_COMPRESSED</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     读取压缩数据
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.fl-unchanged">
    <strong><code>ZIPARCHIVE::FL_UNCHANGED</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     使用原始数据，忽略更改。
    </span>
   </dd>

  
  
  
   <dt id="ziparchive.constants.cm-default">
    <strong><code>ZIPARCHIVE::CM_DEFAULT</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     更好的压缩或存储。
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-store">
    <strong><code>ZIPARCHIVE::CM_STORE</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     存储（不压缩）。
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-shrink">
    <strong><code>ZIPARCHIVE::CM_SHRINK</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     收缩
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-reduce-1">
    <strong><code>ZIPARCHIVE::CM_REDUCE_1</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     用因子1换算
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-reduce-2">
    <strong><code>ZIPARCHIVE::CM_REDUCE_2</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     用因子2换算
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-reduce-3">
    <strong><code>ZIPARCHIVE::CM_REDUCE_3</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     用因子3换算
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-reduce-4">
    <strong><code>ZIPARCHIVE::CM_REDUCE_4</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     用因子4换算
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-implode">
    <strong><code>ZIPARCHIVE::CM_IMPLODE</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     聚爆
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-deflate">
    <strong><code>ZIPARCHIVE::CM_DEFLATE</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     deflated
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-deflate64">
    <strong><code>ZIPARCHIVE::CM_DEFLATE64</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     deflate64
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-pkware-implode">
    <strong><code>ZIPARCHIVE::CM_PKWARE_IMPLODE</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     PKWARE imploding
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.cm-bzip2">
    <strong><code>ZIPARCHIVE::CM_BZIP2</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     BZIP2算法
    </span>
   </dd>

  
  
  
   <dt id="ziparchive.constants.er-ok">
    <strong><code>ZIPARCHIVE::ER_OK</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     没有错误。
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-multidisk">
    <strong><code>ZIPARCHIVE::ER_MULTIDISK</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     不支持多磁盘zip压缩包。
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-rename">
    <strong><code>ZIPARCHIVE::ER_RENAME</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     重命名临时文件失败。
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-close">
    <strong><code>ZIPARCHIVE::ER_CLOSE</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     关闭zip压缩包失败。
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-seek">
    <strong><code>ZIPARCHIVE::ER_SEEK</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     寻址错误
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-read">
    <strong><code>ZIPARCHIVE::ER_READ</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     读取错误
    </span>
   </dd>

  
  
  
   <dt id="ziparchive.constants.er-write">
    <strong><code>ZIPARCHIVE::ER_WRITE</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     写入错误
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-crc">
    <strong><code>ZIPARCHIVE::ER_CRC</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     CRC校验失败
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-zipclosed">
    <strong><code>ZIPARCHIVE::ER_ZIPCLOSED</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     zip压缩包已关闭
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-noent">
    <strong><code>ZIPARCHIVE::ER_NOENT</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     没有文件
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-exists">
    <strong><code>ZIPARCHIVE::ER_EXISTS</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     文件已经存在
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-open">
    <strong><code>ZIPARCHIVE::ER_OPEN</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     不能打开文件
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-tmpopen">
    <strong><code>ZIPARCHIVE::ER_TMPOPEN</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     创建临时文件失败
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-zlib">
    <strong><code>ZIPARCHIVE::ER_ZLIB</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     Zlib错误
    </span>
   </dd>

  
  
  
   <dt id="ziparchive.constants.er-memory">
    <strong><code>ZIPARCHIVE::ER_MEMORY</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     内存分配失败
    </span>
   </dd>

  
  
  
   <dt id="ziparchive.constants.er-changed">
    <strong><code>ZIPARCHIVE::ER_CHANGED</code></strong>
    (<span class="type"><a href="language.types.string.html" class="type string">string</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     条目已被改变
    </span>
   </dd>

  
  
  
   <dt id="ziparchive.constants.er-compnotsupp">
    <strong><code>ZIPARCHIVE::ER_COMPNOTSUPP</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     不支持的压缩方式
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-eof">
    <strong><code>ZIPARCHIVE::ER_EOF</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     过早的EOF
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-inval">
    <strong><code>ZIPARCHIVE::ER_INVAL</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     无效的参数
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-nozip">
    <strong><code>ZIPARCHIVE::ER_NOZIP</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     不是一个zip压缩包
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-internal">
    <strong><code>ZIPARCHIVE::ER_INTERNAL</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     Internal error
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-incons">
    <strong><code>ZIPARCHIVE::ER_INCONS</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     Zip压缩包不一致
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-remove">
    <strong><code>ZIPARCHIVE::ER_REMOVE</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     不能移除文件
    </span>
   </dd>

  
  
   <dt id="ziparchive.constants.er-deleted">
    <strong><code>ZIPARCHIVE::ER_DELETED</code></strong>
    (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
   </dt>

   <dd>

    <span class="simpara">
     条目已被删除
    </span>
   </dd>

  
 </dl>

</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="zip.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="zip.examples.html">范例</a></div>
 <div class="up"><a href="book.zip.html">Zip</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
